﻿using System;
using System.Collections.Generic;
using NDBGen.Configuration;

namespace NDBGen.Plugins.DataAccess
{
    public interface IDataAccessCodeFileGenerator : IFileGenerator<DataAccessGeneratorPluginData>
    {
        void WriteBaseContext(SchemaDataAccessOutputElement config, IIndentedTextWriter writer);

        void WriteContextType(SchemaDataAccessOutputElement config, IEnumerable<Table> tables, IIndentedTextWriter writer);

        void WriteModel(SchemaDataAccessOutputElement config, Table table, IIndentedTextWriter writer);

        String GetBaseContextOutputFilePath(SchemaDataAccessOutputElement config);

        String GetModelOutputFilePath(SchemaDataAccessOutputElement config, Table table);

        String GetContextOutputFilePath(SchemaDataAccessOutputElement config, String schemaName);

        Boolean CanGenerateContextType { get; }
    }
}